home *** CD-ROM | disk | FTP | other *** search
- /* %filename% -- Modal dialog */
- /* Created %date% %time% by AppMaker */
-
- %If lang = MPW%
- #include <Types.h>
- #include <Quickdraw.h>
- #include <Controls.h>
- #include <Dialogs.h>
- #include <Events.h>
- #include <Lists.h>
- #include <Menus.h>
- #include <TextEdit.h>
-
- %end if%
- #include "ResourceDefs.h"
- #include "DialogAids.h"
-
- #include "%unitname%.h"
-
- #define nil 0L
-
- %for each item gen itemNr%
- %If lang = MPW%
-
- #pragma segment %unitname%
- %end if%
-
- %for each item gen auxiliary%
- %if needsFilter%
- /*----------*/
- pascal Boolean Filter%dlogname% (DialogPtr whichDialog,
- EventRecord *event,
- short *itemHit);
- pascal Boolean Filter%dlogname% (whichDialog, event, itemHit)
- DialogPtr whichDialog;
- EventRecord *event;
- short *itemHit;
- {
- Boolean filtered;
-
- filtered = false;
- %for each item gen filter%
- if (!filtered) {
- filtered = StandardFilter (whichDialog, event, itemHit);
- }
- return (filtered);
- } /*Filter%dlogname%*/
-
- %end if%
- /*----------*/
- Boolean Get%dlogname% (%dlogname%)
- %dlogname%Rec% %*%dlogname%;
- {
- DialogPtr theDialog;
- Boolean result;
- Boolean done;
- short itemNr;
- register %dlogname%Ptr info;
-
- InitCursor ();
- theDialog = GetNewDialog (%dlogname%ID, nil, (WindowPtr) -1L);
- SetPort (theDialog);
- info = %dlogname%;
- %for each item gen set%
-
- ShowWindow (theDialog);
- OutlineButton (1);
- done = false;
- while (!done) {
- %for each item gen enable%
- %if needsFilter%
- ModalDialog (Filter%dlogname%, &itemNr);
- %else%
- ModalDialog (nil, &itemNr);
- %end if%
- switch (itemNr) {
- %for each item gen hit%
- } /* switch */
- } /* while */
- %for each item gen finish%
- DisposDialog (theDialog);
- return (result);
- } /*Get%dlogname%*/
-
- /* %unitname% */